package classes;

import java.sql.*;
import javax.swing.JOptionPane;

public class Conector {

    public Connection conn;
    public String url, user, pass;

    public Conector() {
        url = "jdbc:mysql://localhost:3306/";
        user = "root";
        pass = "root";
        try {
            Class.forName("com.mysql.jdbc.Driver");
            conn = DriverManager.getConnection(url+"ControleDeEstoque", user, pass);
        } catch (ClassNotFoundException e) {
            JOptionPane.showMessageDialog(null,"Classe não encontrada");
        } catch (SQLException e) {
           
            e.printStackTrace();
        }
    }
}
